package com.iflytek.service.impl;

import com.iflytek.bean.Emp;
import com.iflytek.dao.EmpDao;
import com.iflytek.dao.impl.EmpDaoImpl;
import com.iflytek.service.EmpService;

import java.util.List;

public class EmpServiceImpl implements EmpService {
    EmpDao dao = new EmpDaoImpl();

    /*
     *获取所有员工信息的方法
     */
    @Override
    public List<Emp> getAllEmp() {
        List<Emp> empList  =dao.getAllEmp();
        return empList;
    }

    @Override
    public List<Emp> addEmp(Emp emp) {
        Emp emp1 = emp;
        List<Emp> empList = dao.addEmp(emp1);
        return empList;
    }

    @Override
    public void upDate(int empno) {
         dao.upDate(1017);
    }

    @Override
    public void delEmpById(int empno) {
      dao.delEmpById(1020);
    }

    @Override
    public List<Emp> selectLikeName(String ename) {
        List<Emp> empList = dao.selectLikeName(ename);
        return empList;
    }
}
